const a = new Map()


// const b = new Map('123123123') TypeError: Iterator value 1 is not an entry object
// const b = new Map({  TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
//   a:1,
//   b:2
// }) 
// const b = new Map([1,2]) TypeError: Iterator value 1 is not an entry object
const b = new Map([[1,2]]) //
console.log(b) 


a.set({},'2')

a.set(1,2)
a.set([],2)
a.set(new Set(), 2)
a.set(new Set('21321'), 2)

console.log(a)


const mp = new Map([
  ["a", 3],
  ["c", 10],
  ["b", 4],
  ["c", 5]  // 5 覆盖前面10 的值
]);
console.log(mp)
const result = [...mp]
console.log(result);

// for (const [key, value] of mp) {
//     console.log(key, value)
// }

mp.forEach((value, key, mp) => {
  console.log(value, key, mp)
})